package com.example.cwt101_group.merchant.mapper;

import com.example.cwt101_group.merchant.params.MerchantRequestParams;
import com.example.cwt101_group.merchant.pojo.Merchant;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface MerchantMapper {
    //写具体的接口
    //商家的注册
    int addMerchant(MerchantRequestParams MerchantRequestParams); // 因为是面向对象语言，所以直接给对象不给参数如string name
    //查询商家账号在数据库中是否存在
    Merchant findMerchantByName(String mname);

    //商家登陆
    Merchant login(MerchantRequestParams merchantRequestParams);
    //更新商家信息
    int updateMerchant(Merchant merchant);
    //查询所有商家
    List<Merchant> list();
}
